package au.edu.unsw.editingtool.global;

public class GlobalConstant {
	
	public static final String APPLICATIONNAME = "EditingTool";
	// Configuration File Constant 
    public static final String LDAP = "ldap";
    public static final String FEDORA = "fedora";
    public static final String DATABASE = "database";
    public static final String TRANSFORM = "transform";
    
    // Parameter vars
    public static final String DEBUG= "debug";
	
    
	//Filename for JSP page will be used for redirect
	public static final String JSPLogin = "login.jsp";
	public static final String JSPFormdata = "formdata.jsp";
	public static final String JSPPreview = "preview.jsp";
	public static final String JSPSubmit = "submit.jsp";
	public static final String JSPMain = "main.jsp";
	public static final String JSPClaim = "claim.jsp";
	public static final String JSPClaimPreview = "claimpreview.jsp";
	public static final String JSPClaimSubmit = "claimsubmit.jsp";
	public static final String JSPClaimReview = "claimreview.jsp";
	public static final String JSPClaimReviewSubmit = "claimreviewsubmit.jsp";
	public static final String JSPError = "error.jsp";
	
	// File name for Servlet will be used for redirect
	public static final String ServletLogin = "LoginManager";
	public static final String ServletLogout = "LogoutManager";
	public static final String ServletMain = "Main";
	public static final String ServletError = "Error";
	public static final String ServletEdit = "Edit";
	public static final String ServletClaim = "Claim";
	public static final String ServletClaimReview = "ClaimReview";
	public static final String ServletPreview = "Preview";
	public static final String ServletFormSubmit = "FormSubmit";
	public static final String ServletReview = "Review";
	public static final String ServletUpload = "Upload";
	
	
	public static final int mySQLDuplicateErrorCode = 1062;
	public static final int affiliationNullValueKey	= 1;
	public static final String GlobalConstantNull = "GlobalConstantNull";
	
	public static final String redirectPageWaitingForReview = "this work is edited by other author";
	
	//Session related and html element tag name
	public static final String username = "username";
	public static final String userGroup = "group";
	public static final String userAnonymous = "anonymous";
	public static final String password = "password";
	public static final String pid	   = "pid";
	public static final String dsid	   = "dsid";
	public static final String sid	   = "sid";	
	public static final String ObjectStatus = "objectStatus";
	
	// The var for task/function to perform (requestCommand)
	public static final String requestLastCommand = "last_ctrl";
	public static final String requestCommand  = "ctrl";	
	public static final String requestCommandType = "commandType";
		
	public static final String requestFormData = "formData";
	public static final String requestFormDataJS = "formDataJS";
	public static final String requestFormAction = "action";
	public static final String requestQuerystring = "querystring";
	
	// This is used to give a type and control for the response to the jsp page
	public static final String responseType = "responseType";
	public static final String responseControl = "responseControl";
	public static final String responseMsg = "responseMessage";
	
	// This is the type (error and success only) and control of response 
	public static final String typeError = "error";
	public static final String typeSuccess = "success";
	public static final String cmdMain = "main";
	public static final String cmdLogin = "login";
	public static final String cmdLogout = "logout";
	public static final String cmdEdit = "edit";
	public static final String cmdPreview = "preview";
	public static final String cmdFormSubmit = "formsubmit";
	public static final String cmdClaim = "claim";	
	public static final String cmdClaimPreview = "claimpreview";	
	public static final String cmdClaimSubmit = "claimsubmit";	
		
	//Main Page param
	public static final String paramClaimRequest  = "claimRequest";
	public static final String paramClaimClaimed   = "claimClaimed";
	
	// For ClaimReview param
	public static final String paramClaimSearchText = "claimSearchText";
	public static final String paramclaimSearchType = "claimSearchType";
	public static final String paramClaimUsername  = "claimUsername";
	public static final String paramClaimPid  = "claimPid";
	public static final String paramClaimStatus  = "claimStatus";
	public static final String paramClaimRequestAll  = "claimRequestAll";
	public static final String paramClaimClaimedAll   = "claimClaimedAll";
	public static final String paramClaimAll   = "claimClaimAll";
	public static final String paramClaimUpdateStatus   = "claimUpdateStatus";
	public static final String paramClaimUserTemplate  = "CUSER_";
	public static final String paramClaimPidTemplate  = "CPID_";
	public static final String paramClaimSearchTemplate  = "CSEARCH_";
	
	// This is the type (error and success only) and control of response for REVIEW
	public static final String cmdClaimReview = "claimreview";
	public static final String cmdClaimReviewSearch = "claimreviewsearch";
	public static final String cmdClaimStatusUpdate = "claimstatusupdate";
	public static final String cmdClaimReviewUpdate = "claimreviewupdate";
	public static final String cmdClaimDelete = "claimdelete";
	public static final String cmdReview = "review";
	
	// DO WE NEED IT?
	public static final String loginInfo  = "isLogin";
	public static final String loginTrue  = "true";
	public static final String loginFalse  = "false";
	
	// Group
	public static final String groupSysAdmin = "system admin";
	public static final String groupAdmin = "administrator";
	public static final String groupReview = "reviewer";
	public static final String groupUser = "user";
	
	/*
	 * GLOBAL CONSTANT DB STATUS START HERE
	 */

	//Login Status
	public static final String statusLoginAllow = "1";
	public static final String statusLoginDeny = "2";
	
	//Claim table Status
	public static final String claimRequest = "3";
	public static final String claimClaimed = "4";
	
	//Publication table
	//Object_status
	public static final String objectNew = "5";
	public static final String objectReview = "6";
	public static final String objectApproved = "7";
	//Datastream_status

	
		
	// For login on db

	public static final String fileSeparator  = System.getProperty("file.separator");
	public static final String configFilePath = "conf/editingtool.properties";
	public static final String tempFileDir	  = "/temp/editingtool";
	public static final String xslFileDir	  = "xsl";
	
	public static final String valetDocFormData = "formdata";
}
